<!DOCTYPE html>
<html lang="en">

<head>
    <title>Import Book</title>
    <meta name="comp2800 template" content="My 2800 App">

    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap Library CSS JS CDN go here -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>

    <!-- Firebase 8 Library related CSS, JS, JQuery go here -->
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.js"></script>

    <!-- Other libraries and styles of your own -->
    <!-- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> -->
    <!-- <link rel="stylesheet" href="./styles/style.css"> -->
</head>

<body>
    <!-- our own navbar goes here -->
    <nav id="navbarPlaceholder"></nav>

    <!-- the body of your page goes here -->
    <div class="container mt-5">
        <h1 class="text-center">导入图书</h1>
        <div class="row justify-content-center">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="bookFolder">选择文件夹</label>
                    <input type="file" id="bookFolder" class="form-control" webkitdirectory directory multiple>
                </div>
                <button id="importButton" class="btn btn-primary mt-3">导入图书</button>
            </div>
        </div>
        <div id="importResult" class="mt-5"></div>
        <!-- 新增：用于显示已导入书籍的列表 -->
        <h2 class="mt-5">已导入的书籍</h2>
         <ul id="importedBooksList"></ul>
        <ul id="booksDirectoryList"></ul>
    </div>

    <!-- our own footer goes here-->
    <nav id="footerPlaceholder"></nav>

    <!-- Your own JavaScript functions go here -->
    <script src="./scripts/skeleton.js"></script>
    <script src="./scripts/importBooks.js"></script>
</body>

</html>